package edu.umassd.visual.options;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.AbstractButton;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import edu.umassd.visual.components.Coordinates;

@Component("toggleCoords")
public class ToggleCoordinates implements ActionListener
{
	@Autowired
	private Coordinates coords;

	@Override
	public void actionPerformed(ActionEvent e)
	{
		AbstractButton button = (AbstractButton) e.getSource();

		coords.setVisible(button.isSelected());
	}
}
